Skip to content

Add state management tests for connection #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2018
Merged

Conversation

rkstedman
Copy link
Contributor

@rkstedman rkstedman commented Dec 19, 2017

Changes

  • Fixed a couple spelling mistakes in a comment
  • Added very simple state unit tests for Connection state

Potential future improvements

  • Add additional tests for bindToSocket that check:
    • connection.state should be connecting if socket.readyState is 0 or 1
    • connection.state should be disconnected if socket.readyState is not 0 or 1

@coveralls
Copy link

coveralls commented Dec 19, 2017

Coverage Status

Coverage increased (+0.05%) to 96.152% when pulling 8081057 on add-connection-tests into 6a0f779 on master.

Copy link
Contributor

@curran curran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to see new tests being added!

@@ -81,7 +81,7 @@ Connection.prototype.bindToSocket = function(socket) {

this.socket = socket;

// State of the connection. The correspoding events are emmited when this changes
// State of the connection. The corresponding events are emitted when this changes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rkstedman rkstedman changed the title Add connection tests Add state management tests for connection Dec 28, 2017
@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage remained the same at 96.161% when pulling 9b7b3de on add-connection-tests into d64b202 on master.

@rkstedman
Copy link
Contributor Author

Tests ended up being included and merged with this PR: #175

@rkstedman rkstedman merged commit 01c61ff into master Jan 20, 2018
@rkstedman rkstedman deleted the add-connection-tests branch January 20, 2018 01:25
@curran
Copy link
Contributor

curran commented Jan 22, 2018

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants